package org.openwork.portlet.skillmanagement.model;

import org.openwork.portlet.skillmanagement.service.persistence.SkillUserPK;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * <a href="SkillUserSoap.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class is used by
 * {@link org.openwork.portlet.skillmanagement.service.http.SkillUserServiceSoap}.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       org.openwork.portlet.skillmanagement.service.http.SkillUserServiceSoap
 * @generated
 */
public class SkillUserSoap implements Serializable {
    private long _userId;
    private long _skillId;
    private long _auditUserId;
    private Date _createDate;
    private Date _modifiedDate;
    private Short _experience;

    public SkillUserSoap() {
    }

    public static SkillUserSoap toSoapModel(SkillUser model) {
        SkillUserSoap soapModel = new SkillUserSoap();

        soapModel.setUserId(model.getUserId());
        soapModel.setSkillId(model.getSkillId());
        soapModel.setAuditUserId(model.getAuditUserId());
        soapModel.setCreateDate(model.getCreateDate());
        soapModel.setModifiedDate(model.getModifiedDate());
        soapModel.setExperience(model.getExperience());

        return soapModel;
    }

    public static SkillUserSoap[] toSoapModels(SkillUser[] models) {
        SkillUserSoap[] soapModels = new SkillUserSoap[models.length];

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModel(models[i]);
        }

        return soapModels;
    }

    public static SkillUserSoap[][] toSoapModels(SkillUser[][] models) {
        SkillUserSoap[][] soapModels = null;

        if (models.length > 0) {
            soapModels = new SkillUserSoap[models.length][models[0].length];
        } else {
            soapModels = new SkillUserSoap[0][0];
        }

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModels(models[i]);
        }

        return soapModels;
    }

    public static SkillUserSoap[] toSoapModels(List<SkillUser> models) {
        List<SkillUserSoap> soapModels = new ArrayList<SkillUserSoap>(models.size());

        for (SkillUser model : models) {
            soapModels.add(toSoapModel(model));
        }

        return soapModels.toArray(new SkillUserSoap[soapModels.size()]);
    }

    public SkillUserPK getPrimaryKey() {
        return new SkillUserPK(_userId, _skillId);
    }

    public void setPrimaryKey(SkillUserPK pk) {
        setUserId(pk.userId);
        setSkillId(pk.skillId);
    }

    public long getUserId() {
        return _userId;
    }

    public void setUserId(long userId) {
        _userId = userId;
    }

    public long getSkillId() {
        return _skillId;
    }

    public void setSkillId(long skillId) {
        _skillId = skillId;
    }

    public long getAuditUserId() {
        return _auditUserId;
    }

    public void setAuditUserId(long auditUserId) {
        _auditUserId = auditUserId;
    }

    public Date getCreateDate() {
        return _createDate;
    }

    public void setCreateDate(Date createDate) {
        _createDate = createDate;
    }

    public Date getModifiedDate() {
        return _modifiedDate;
    }

    public void setModifiedDate(Date modifiedDate) {
        _modifiedDate = modifiedDate;
    }

    public Short getExperience() {
        return _experience;
    }

    public void setExperience(Short experience) {
        _experience = experience;
    }
}
